package homeword;


public class sensitiveWords_StringReplace {
    public static void main(String[] args) {
      String talk="CNM的";
        //定义一个词库
        String []arr={"CNM","TMD","WR","C"};
        for (int i = 0; i < arr.length; i++) {
            talk = talk.replace(arr[i], "***");
        }
        System.out.println(talk);
    }
}
